The present invention relates to a programmable controller that simulates a program in response to simulated inputs.
Generally, a programmable controller is connected to input devices, such as sensors and limit switches, as well as to external loads, such as valves and motors to be controlled. The steps required for control of the target equipment are compiled beforehand as a program that is incorporated in the controller.
Programming errors, if left undetected, may prevent the controller from providing the kind of control desired. It is therefore general practice to simulate the program for checkup before the actual operation is attempted.
FIG. 16 (a) shows a prior art example of the simulating of a program run with a programmable controller. In this figure, a programmable controller 1 is connected to an external load (device) 3 and to a limit switch 2a that operates in conjunction with the internal load. In actual operation, a driving output signal from the programmable controller 1 activates the external load 3. The limit switch 2a operates a certain period of time after the starting of the operation. Instead of having these actions actually carried out, which can be dangerous because of the unpredictability involved, the arrangement in FIG. 16 uses an externally prepared input switch 2' for testing that is manually operated for program simulation by use of the programmable controller alone.
One disadvantage of the prior art arrangement outlined above is the need to prepare and add the input switch 2' every time a simulation is to be performed. A prior art solution to this problem is to incorporate the input switch 2' in the programmable controller, as disclosed in Japanese Patent Laid-open No. 56-85104. Another prior art solution is to program beforehand the number of the input switch to be tested and to refer to the number during simulation, as disclosed in Japanese Patent Laid-open No. 63-21900. The latter setup eliminates the need for the input switch for testing.
These two prior art solutions share a major disadvantage: that it is impossible to simulate the execution of a sequence program that would allow for a precise delay time between the time the external load starts functioning and the time the appropriate limit switch is activated, as illustrated in FIG. 16 (b). With the first prior art solution, as mentioned above, in which the input switch for testing is externally attached, as shown in FIG. 16 (a), the switch needs to be operated manually. This means it is impossible to operate the switch for strict timing requirements. With the second prior art solution in which the number of the input switch for testing is preprogrammed, the stored program contents are input immediately, thus making it impossible to meet the timing requirements allowing for the delay time involved.
As indicated, it is impossible for sequence programs in which the delay time is controlled to verify through simulation whether or not the programmed contents are correct.